from db import db

class HourseInfo(db.Model):
    __tablename__ = 'hourse_info'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    title = db.Column(db.String(255), nullable=False, comment='楼盘名称')
    cover = db.Column(db.String(255), nullable=False, comment='楼盘图片')
    city = db.Column(db.String(255), nullable=False, comment='城市')
    region = db.Column(db.String(255), nullable=False, comment='行政区')
    address = db.Column(db.String(3096), nullable=False, comment='详情地址')
    rooms_desc = db.Column(db.String(255), nullable=False, comment='户型')
    area_range = db.Column(db.String(255), nullable=False, comment='面积')
    all_ready = db.Column(db.String(255), nullable=False, comment='预售资格证')
    price = db.Column(db.String(255), nullable=False, comment='房价')
    hourse_decoration = db.Column(db.String(255), nullable=True, comment='装修情况')
    company = db.Column(db.String(255), nullable=True, comment='公司')
    hourse_type = db.Column(db.String(255), nullable=False, comment='房屋类型')
    on_time = db.Column(db.String(255), nullable=False, comment='交房时间')
    open_date = db.Column(db.String(255), nullable=False, comment='开盘时间')
    tags = db.Column(db.String(3096), nullable=False, comment='房屋标签')
    total_price_range = db.Column(db.String(255), nullable=False, comment='总价')
    sale_status = db.Column(db.String(255), nullable=False, comment='交易状态')
    detail_url = db.Column(db.String(3096), nullable=False, comment='详情页')

    def __repr__(self):
        return '<User %r>' % self.title